<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Object3D Mesh</title>
    <style>
        html, body{ width: 100%; height: 100%;}
    </style>
</head>
<body>
    <div id="map3D" style="width: 100%; height: 100%;"></div>


<script src="https://webapi.amap.com/loader.js"></script>
<script src="dish/createObject3D.min.js"></script>
<script>
    AMapLoader.load({
        key: 'se517682666a4587450eaf4bf1b579a8ax',  //填写自己申请的高德Key
        version: '1.4.15',  //2.0版本 已把Object3D移除, 目前只能使用1.4.15版本
        plugins: ['AMap.Object3DLayer']
    }).then((AMap)=>{
        //创建地图实例化
        var map3D = new AMap.Map('map3D', {
            viewMode: '3D', //开启3D模式
            center: [112.563826, 28.2788],
            zoom: 18,
            zooms: [17, 20],
            pitch: 55,  //倾斜角度
            mapStyle: 'amap://styles/06f01317a7fc471a8557aa3854ff26a5'  //自定义地图ID
        });

        //创建扫描组件实例
        var scanner = new CreateObject3D(map3D, { lnglat: map3D.getCenter()});

    }).catch((e)=>{
        console.error('AMap 加载失败 Info: ', e);
    })
</script>
</body>
</html>